<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <ui:composition>
        <nav class="navbar navbar-default navbar-fixed-top" role="navigation">

            <div class="container-fluid">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="#{request.contextPath}/index.jsf" style="padding: 0px;">    
                        <img src="#{request.contextPath}/resources/images/icon.png" width="50" height="50"/>
                    </a>
                </div>

                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">
                        <li><h:link value="#{msg.tlb_Enfermedad}" outcome="adm-enfermedad" /></li>
                        <li><h:link value="#{msg.tlb_Hospital}" outcome="adm-hospital" /></li>
                        <li><h:link value="#{msg.tlb_Parentesco}" outcome="adm-parentesco" /></li>
                        <li><h:link value="#{msg.tlb_Arritmia}" outcome="adm-arritmia" /></li>
                        <li><h:link value="Medicos" outcome="adm-medico-mng" /></li>
                        <li><h:link value="Memoria Asocitiva" outcome="adm-rp" /></li>
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                #{msg.tlb_Admin}: #{usuarioActivio.nombre} #{usuarioActivio.apPaterno} <b class="caret"/>
                            </a>
                            <ul class="dropdown-menu">
                                <li><h:link value="Cuenta" outcome="med-cuenta-medico" /></li>
                                <li class="divider"></li>
                                <li>
                                    <h:form >
                                        <p:commandLink value="Cerrar sesion" styleClass="link-logout"
                                                       actionListener="#{LoginController.executeCerrarSesion}"/>    
                                    </h:form>                             
                                </li>
                            </ul>
                        </li> 
                        <li> 
                            <h:form id="formLenguage">
                                <table id="table-lenguage">
                                    <tr>
                                        <td >
                                            <h:panelGroup styleClass="margen-der">
                                                <h:commandLink id="switchToSpanish" 
                                                               actionListener="#{LocaleController.setSelectedLocale}">
                                                    <h:graphicImage library="images" name="es.png"
                                                                    alt="Switch language to Spanish" />
                                                    <f:param name="locale" value="es" />
                                                </h:commandLink>
                                            </h:panelGroup>
                                        </td>
                                        <td>

                                            <h:panelGroup >
                                                <h:commandLink id="switchToEnglish" 
                                                               actionListener="#{LocaleController.setSelectedLocale}">
                                                    <h:graphicImage library="images" name="en.png"
                                                                    alt="Switch language to Spanish" />
                                                    <f:param name="locale" value="en" />
                                                </h:commandLink>
                                            </h:panelGroup>	
                                        </td>
                                    </tr>
                                </table>
                            </h:form>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    </ui:composition>
</html>
